package com.commerce.recording.utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;

public  class FormatDate {
    public static String toHHmmssS(long mElapsedMillis){
        //转换格式
        SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:S", Locale.CHINA);
        dateFormat.setTimeZone(TimeZone.getTimeZone("GMT+00:00"));
        // time为转换格式后的字符串
        return dateFormat.format(new Date(mElapsedMillis));
    }
    public static String tommss(long mElapsedMillis){
        //转换格式
        SimpleDateFormat dateFormat = new SimpleDateFormat("mm:ss", Locale.CHINA);
        dateFormat.setTimeZone(TimeZone.getTimeZone("GMT+00:00"));
        // time为转换格式后的字符串
        return dateFormat.format(new Date(mElapsedMillis));
    }
}
